﻿using Mono.Cecil.Cil;

public abstract class LuaVariableReference : LuaVarReference
{
    private readonly VariableReference _self;
    public LuaVariableReference(LuaModuleDefinition module, VariableReference self) : base(module)
    {
        _self = self;
        Name = self.ToString();
    }
    public int Index
    => _self.Index;
    public abstract LuaVariableDefinition Resolve();
    public LuaTypeReference Type
        => GetTypeReference(_self.VariableType);
}

